<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <title>个人中心</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" href="../../css/aui.css" type="text/css" />
    <style media="screen">
        .profile {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 10rem;
            background: url('../../image/avatar_bg.png') center center no-repeat;
            overflow: hidden;
        }

        .avatar {
            width: 5rem;
            height: 5rem;
            background-color: rgba(255, 255, 255, 0.9);
            border-radius: 100%;
            overflow: hidden;
        }

        .avatar img {
            display: block;
            width: 100%;
            height: auto;
        }

        .profile h3 {
            margin: 0.5rem auto;
            font-weight: 400;
            color: #fff;
        }

        .profile p {
            margin: 0;
            color: #fff;
        }
    </style>
</head>

<body>
    <div class="profile aui-padding-">
        <div class="avatar">
            <img src="../../image/demo02.jpeg" alt="">
        </div>
        <h3 class="aui-font-size-16"></h3>
        <p class="aui-font-size-14 partName"></p>
    </div>
    <ul class="aui-list aui-list-in">
        <li class="aui-list-item" tapmode onclick="setting()">
            <div class="aui-list-item-inner aui-list-item-arrow">
                设置
            </div>
        </li>
    </ul>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript">
    apiready = function() {
        $api.text($api.dom('h3'), $api.getStorage('username'));
        var role = $api.getStorage('role');
        if (role === '2') {
            $api.text($api.dom('.partName'), '建设方');
        }
        if (role === '3') {
            $api.text($api.dom('.partName'), '监理方');
        }
        if (role === '4') {
            $api.text($api.dom('.partName'), '施工方');
        }
    }

    function setting() {
        api.openWin({
            name: 'setting',
            url: './setting.html',
            pageParam: {
                name: 'set'
            }
        });

    }
</script>

</html>
